{% extends "base.html" %}

{% block content %}
<form method="POST" action="{% if rfc.pk %}{% url posecco:rfc rfc.pk %}{% else %}{% url posecco:rfc 0 %}{% endif %}">
	{% csrf_token %} 
    {% for field in rfc_form %}
        <p>
            {{ field.errors }}
            {{ field.label_tag }} {{ field }}
        </p>
    {% endfor %}
    {{ rfc_form.errors }}
	{% if request.approver and rfc.status == 3 %}
	<input name="accept" type="submit" value="Accept" class="button" />
	<input name="reject" type="submit" value="Reject" class="button" />
	{% else %}
	<input name="save" type="submit" value="Save" class="button" />
	<input name="close" type="submit" value="Cancel" class="button" />
	{% endif %}
</form>
{% include "workordertable.html" %}
{% endblock %}
